In moving picture coding, data amount is generally compressed by utilizing the spatial and temporal redundancies that exist within a moving picture. Generally speaking, frequency transformation is used as a method utilizing the spatial redundancies, and inter picture prediction coding is used as a method utilizing the temporal redundancies. In the inter picture prediction coding, for coding a current picture, previously coded pictures earlier or later than the current picture in display order are used as reference pictures. The amount of motion of the current picture from the reference picture is estimated, and the difference between the picture data obtained by motion compensation based on that amount of motion and the picture data of the current picture is calculated, so that the temporal redundancies are eliminated. The spatial redundancies are further eliminated from this differential value so as to compress the data amount of the current picture.
In the moving picture coding method called H.264 which has been developed for standardization, a picture which is coded not using inter picture prediction but using intra picture coding is referred to as an I-picture, a picture which is coded using inter picture prediction with reference to one previously processed picture which is earlier or later than a current picture in display order is referred to as a P-picture, and a picture which is coded using inter picture prediction with reference to two previously processed pictures which are earlier or later than a current picture in display order is referred to as a B-picture (See ISO/IEC 14496-2 “Information technology—Coding of audio-visual objects—Part2: Visual” pp. 218-219).
FIG. 1A is a diagram showing relationship between respective pictures and the corresponding reference pictures in the above-mentioned moving picture coding method, and FIG. 1B is a diagram showing the sequence of the pictures in the bit stream generated by coding.
A picture I1 is an I-picture, pictures P5, P9 and P13 are P-pictures, and pictures B2, B3, B4, B6, B7, B8, B10, B11 and B12 are B-pictures. As shown by the arrows, the P-pictures P5, P9 and P13 are coded using inter picture prediction from the I-picture I1 and P-pictures P5 and P9 respectively as reference pictures.
As shown by the arrows, the B-pictures B2, B3 and B4 are coded using inter picture prediction from the I-picture I1 and P-picture P5 respectively as reference pictures. In the same manner, the B-pictures B6, B7 and B8 are coded using the P-pictures P5 and P9 respectively as reference pictures, and the B-pictures B10, B11 and B12 are coded using the P-pictures P9 and P13 respectively as reference pictures.
In the above-mentioned coding, the reference pictures are coded prior to the pictures which refer to the reference pictures. Therefore, the bit stream is generated by the above coding in the sequence as shown in FIG. 1B.
By the way, in the H.264 moving picture coding method, a coding mode called direct mode can be selected. An inter picture prediction method in direct mode will be explained with reference to FIG. 2. FIG. 2 is an illustration showing motion vectors in direct mode, and particularly showing the case of coding a block a in the picture B6 in direct mode. In this case, a motion vector c used for coding a block b in the picture P9 is utilized. The block b is co-located with the block a and the picture P9 is a backward reference picture of the picture B6. The motion vector c is a vector used for coding the block b and refers to the picture P5. The block a is coded using bi-prediction based on the reference blocks obtained from the forward reference picture P5 and the backward reference picture P9 using vectors parallel to the motion vector c. In other words, the motion vectors used for coding the block a are the motion vector d for the picture P5 and the motion vector e for the picture P9.
However, when B-pictures are coded using inter picture prediction with reference to I and P-pictures, the temporal distance between the current B-picture and the reference picture may be long, which causes reduction of coding efficiency. Particularly when a lot of B-pictures are located between adjacent I-picture and P-picture or two P-pictures closest to each other, coding efficiency is significantly reduced.
The present invention has been conceived in order to solve the above-mentioned problem, and it is an object of the present invention to provide a moving picture coding method and a moving picture decoding method for avoiding efficiency reduction of coding B-pictures if a lot of B-pictures are located between an I-picture and a P-picture or between two P-pictures. In addition, it is another object to provide a moving picture coding method and a moving picture decoding method for improving coding efficiency in direct mode.